/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package services;

import dao.UserJpaController;
import java.util.List;
import javax.persistence.Persistence;
import pojo.Buy;

/**
 *
 * @author khalifaabdelaziz
 */
public class ServiceHistory {
    
    UserJpaController userController = new UserJpaController(Persistence.createEntityManagerFactory("ServletProjectPU"));
    
    public List<Buy> viewHistory(Integer id){    
        return userController.findUserBuy(id);
    }
}
